script_enemy_main {
	let imgrate		=GetCurrentScriptDirectory~"img\rate.png";
	let moji		=0;
	let moji1		=0;
	let moji2		=0;
	let moji3		=0;
	let moji4		=0;
	let moji5		=0;
	let moji6		=0;
	let moji7		=0;
	let moji8		=0;
	let moji9		=0;
	let moji01		=0;
	let moji02		=0;
	let moji03		=0;
	let moji04		=0;
	let moji05		=0;
	let moji06		=0;
	let moji07		=0;
	let moji08		=0;
	let moji09		=0;
	let AlphaCount		=255;
	let X			=0;
	let Y			=0;
	let p			=0;
	let SY			=0.5;
	let SX			=0.5;

    @Initialize {
	SetLife(99999);
	LoadGraphic(imgrate);
		mojii;
		si;
		if(GetCommonData("sw_gCount")==100){p=truncate((GetCommonData("pppCount")*GetCommonData("sw_gCount")*5)/400);}
		else{p=truncate((GetCommonData("pppCount")*GetCommonData("sw_gCount"))/400);}
		AddScore(p);
	}

    @MainLoop {
	yield;
	}

	@DrawLoop
	{
	//ꌅ
	SetGraphicRect(0+moji1*10,60,10+moji1*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX+5+X,GetY+Y);
	//
	if(p>9){
	SetGraphicRect(0+moji2*10,60,10+moji2*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX+X,GetY+Y);
	}
	//O
	if(p>99){
	SetGraphicRect(0+moji3*10,60,10+moji3*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-5+X,GetY+Y);
	}
	//l
	if(p>999){
	SetGraphicRect(0+moji4*10,60,10+moji4*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-10+X,GetY+Y);
	}
	//܌
	if(p>9999){
	SetGraphicRect(0+moji5*10,60,10+moji5*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-15+X,GetY+Y);
	}
	//Z
	if(p>99999){
	SetGraphicRect(0+moji6*10,60,10+moji6*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-20+X,GetY+Y);
	}
	//
	if(p>999999){
	SetGraphicRect(0+moji7*10,60,10+moji7*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-25+X,GetY+Y);
	}
	//
	if(p>9999999){
	SetGraphicRect(0+moji8*10,60,10+moji8*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-30+X,GetY+Y);
	}
	//㌅
	if(p>99999999){
	SetGraphicRect(0+moji9*10,60,10+moji9*10,80);
	SetRenderState(ALPHA);
	SetGraphicScale(SX,SY);
	SetAlpha(AlphaCount);
	SetGraphicAngle(0,0,0);
	SetTexture(imgrate);
	DrawGraphic(GetX-35+X,GetY+Y);
	}
	}
	@Finalize{
	//attributeB();
	}
	task si{
		let c=0;
		loop(80){
			yield;
		if(c>=60){
		SY-=0.025;
		SX+=0.2;
		}
		Y-=0.2;
		X+=0.2;
		c++;
		}
		VanishEnemy;
	}

task mojii{
loop{
	moji01=p;
	moji1=moji01;
	if(moji1>9){
	moji01=0;
	}

	moji02=p;
	moji2=truncate(moji02/10);
	if(moji2>9){
	moji02=0;
	}

	moji03=p;
	moji3=truncate(moji03/100);
	if(moji3>9){
	moji03=0;
	}

	moji04=p;
	moji4=truncate(moji04/1000);
	if(moji4>9){
	moji04=0;
	}

	moji05=p;
	moji5=truncate(moji05/10000);
	if(moji5>9){
	moji05=0;
	}

	moji06=p;
	moji6=truncate(moji06/100000);
	if(moji6>9){
	moji06=0;
	}

	moji07=p;
	moji7=truncate(moji07/1000000);
	if(moji7>9){
	moji07=0;
	}

	moji08=p;
	moji8=truncate(moji08/10000000);
	if(moji8>9){
	moji08=0;
	}

	moji09=p;
	moji9=truncate(moji09/100000000);
	if(moji9>9){
	moji09=0;
	}
yield;
}
}

}